/*
 
	Created by Jim Turner on 1/11/10 for http://nukethemfromorbit.com/
 
	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

*/

#import <Foundation/Foundation.h>
#import "JTStrengthTester.h"

int main (int argc, const char * argv[]) 
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

	if( argc <= 1 )
	{
		printf( "Usage: PasswordStrength <password to test>\n" );
		return( 1 );
	}
	
	NSString *pwdToTest = [NSString stringWithCString:argv[1] encoding:NSUTF8StringEncoding];
	NSUInteger result = [JTStrengthTester checkStrengthOfPassword:pwdToTest];

	printf( "%s [len:%lu]: %lu\n", [pwdToTest cStringUsingEncoding:NSUTF8StringEncoding], [pwdToTest length], result );

    [pool drain];
    return 0;
}
